home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
techjock.arc
/
STRNGDEM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-11-18
|
1KB
|
36 lines
Program String_Demo;
uses CRT, StrngTTT;
var
Ch : char;
const
DemoStr = ' string routines developed by BOB "technoJock" ainsbury ';
begin
Clrscr;
writeln(' ''',DemoStr,'''');
Writeln;
Writeln('Upper: ''',Upper(DemoStr),'''');
Writeln('Lower: ''',Lower(DemoStr),'''');
Writeln('Proper: ''',Proper(DemoStr),'''');
writeln('Total words: ',WordCnt(DemoStr));
Writeln('Posn. word 3: ',PosWord(3,DemoStr));
Writeln('Words 2..5 are: ''',ExtractWords(2,4,DemoStr),'''');
Writeln('Strip Leading spaces -');
Writeln(Strip('L',' ',DemoStr));
Writeln('Strip Trailing spaces -');
Writeln(Strip('R',' ',DemoStr));
Writeln('Strip Leading & Trailing spaces -');
Writeln(Strip('B',' ',DemoStr));
Writeln('Strip All spaces -');
Writeln(Strip('A',' ',DemoStr));
Writeln('The last ''o'' is in position ',LastPos('o',DemoStr));
writeln;
Writeln(Overtype(15,'Examples','OverType'),':');
Writeln(OverType(5,'TurboHolic','Bob Ainsbury'));
Writeln(OverType(3,'###','1234567890'));
TextColor(15);
Writeln('Run DemoTTT.exe for the main demo program');
Writeln('Technojocks Turbo Toolkit v4.0');
Ch := Readkey;
end.